package main

import ( "fmt")

const MAX_U = 0xFFFFFFFFFFFFFFFF
const MAX_I = 0x7FFFFFFFFFFFFFFF

func show_ints() {
    a := uint64(MAX_U)
    b := uint32(MAX_U >> 32)
    c := uint16(MAX_U >> 48)
    d := uint8(MAX_U >> 56)
    fmt.Printf("a=%v\nb=%v\nc=%v\nd=%v\n", a, b, c, d)

    e := int64(MAX_I) * -1
    f := int32(MAX_I >> 32) * -1
    g := int16(MAX_I >> 48) * -1
    h := int8(MAX_I >> 56) * -1
    fmt.Printf("e=%v\nf=%v\ng=%v\nh=%v\n", e, f, g, h)
}

func show_floats() {
    a := float64(MAX_U)
    b := float32(MAX_U >> 32)
    fmt.Printf("a=%v\nb=%v\n", a, b)
    a = a * -1
    b = b * -1
    fmt.Printf("a=%v\nb=%v\n", a, b)
}

func main() {
    show_ints()
    show_floats()
}
